Skip to content

Conversation

@RafaelGSS
Copy link
Member

Address: #40730.

@nodejs-github-bot nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. needs-ci PRs that need a full CI run. labels Nov 8, 2021
@mcollina
Copy link
Member

mcollina commented Nov 8, 2021

cc @jasnell @addaleax

we need this to support Bubbleprof without the deprecation notice.

added: REPLACEME
-->
* Returns: A list of providers supported by async wrap.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we define anywhere what a "provider" is?
Also, to me "A list" means an array, but an object is returned.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it wasn't defined, at least publically. I can reword that for sure, but, to be honest, I don't know how to define the providers description.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Returns: A list of providers supported by async wrap.
* Returns: A map of provider types supported by async wrap.

I would also add something to the description linking it to type parameter of the init(...) hook.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just did, thanks for point that out!

Copy link
Member

@Qard Qard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

* Returns: A map of provider types to the corresponding numeric id.
This map contains all the event types that might be emitted by the `async_hooks.init()` event.
This feature suppresses the deprecated usage of `process.binding('async_wrap').Providers`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a link to DEP0111

@Flarna
Copy link
Member

Flarna commented Nov 11, 2021

Nit: My understaning of the commit message guideline tells that the commit message should start with async_hooks.

@Qard
Copy link
Member

Qard commented Nov 11, 2021

I would just squash it all before merging and give it the async_hooks subsystem prefix then.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS force-pushed the feat/expose-async-wrap-providers branch from f95a743 to 29ad912 Compare November 12, 2021 03:15
docs: add asyncWrapProviders api doc

tests(async_hooks): use internalBinding for comparisson

fix(test-async-wrap): lint error

docs: use REPLACEME for asyncWrapProviders

update: use freeze and copy for asyncWrapProviders

update(async_hooks): use primordials on asyncWrapProviders

fix: use common to expect error

docs(asyncWrapProviders): rephrase return type

fix: lint md

fix: lint md

docs(async_hooks): typo

Co-authored-by: Stephen Belanger <[email protected]>

update(asyncWrapProviders): add __proto__ as null

Co-authored-by: Simone Busoli <[email protected]>
Co-authored-by: Michaël Zasso <[email protected]>

test: adjust __proto__ assertion

docs: add DEP0111 link
@RafaelGSS RafaelGSS force-pushed the feat/expose-async-wrap-providers branch from 29ad912 to c19f6e2 Compare November 12, 2021 04:08
@nodejs-github-bot
Copy link
Collaborator

@RafaelGSS RafaelGSS requested a review from Qard November 12, 2021 12:59
@RafaelGSS RafaelGSS requested a review from targos November 12, 2021 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooks Issues and PRs related to the async hooks subsystem. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants